Optimal. Leaf size=145 \[ -\frac {b^2 (3 b B d-A b e-3 a B e) x}{e^4}+\frac {b^3 B x^2}{2 e^3}-\frac {(b d-a e)^3 (B d-A e)}{2 e^5 (d+e x)^2}+\frac {(b d-a e)^2 (4 b B d-3 A b e-a B e)}{e^5 (d+e x)}+\frac {3 b (b d-a e) (2 b B d-A b e-a B e) \log (d+e x)}{e^5} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 145, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {78}
\begin {gather*} -\frac {b^2 x (-3 a B e-A b e+3 b B d)}{e^4}+\frac {(b d-a e)^2 (-a B e-3 A b e+4 b B d)}{e^5 (d+e x)}-\frac {(b d-a e)^3 (B d-A e)}{2 e^5 (d+e x)^2}+\frac {3 b (b d-a e) \log (d+e x) (-a B e-A b e+2 b B d)}{e^5}+\frac {b^3 B x^2}{2 e^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rubi steps
\begin {align*} \int \frac {(a+b x)^3 (A+B x)}{(d+e x)^3} \, dx &=\int \left (\frac {b^2 (-3 b B d+A b e+3 a B e)}{e^4}+\frac {b^3 B x}{e^3}+\frac {(-b d+a e)^3 (-B d+A e)}{e^4 (d+e x)^3}+\frac {(-b d+a e)^2 (-4 b B d+3 A b e+a B e)}{e^4 (d+e x)^2}-\frac {3 b (b d-a e) (-2 b B d+A b e+a B e)}{e^4 (d+e x)}\right ) \, dx\\ &=-\frac {b^2 (3 b B d-A b e-3 a B e) x}{e^4}+\frac {b^3 B x^2}{2 e^3}-\frac {(b d-a e)^3 (B d-A e)}{2 e^5 (d+e x)^2}+\frac {(b d-a e)^2 (4 b B d-3 A b e-a B e)}{e^5 (d+e x)}+\frac {3 b (b d-a e) (2 b B d-A b e-a B e) \log (d+e x)}{e^5}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 238, normalized size = 1.64 \begin {gather*} \frac {-a^3 e^3 (A e+B (d+2 e x))-3 a^2 b e^2 (A e (d+2 e x)-B d (3 d+4 e x))+3 a b^2 e \left (A d e (3 d+4 e x)+B \left (-5 d^3-4 d^2 e x+4 d e^2 x^2+2 e^3 x^3\right )\right )+b^3 \left (A e \left (-5 d^3-4 d^2 e x+4 d e^2 x^2+2 e^3 x^3\right )+B \left (7 d^4+2 d^3 e x-11 d^2 e^2 x^2-4 d e^3 x^3+e^4 x^4\right )\right )+6 b (b d-a e) (2 b B d-A b e-a B e) (d+e x)^2 \log (d+e x)}{2 e^5 (d+e x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 267, normalized size = 1.84
method | result | size |
default | \(\frac {b^{2} \left (\frac {1}{2} B b e \,x^{2}+A b e x +3 B a e x -3 B b d x \right )}{e^{4}}-\frac {a^{3} A \,e^{4}-3 A \,a^{2} b d \,e^{3}+3 A a \,b^{2} d^{2} e^{2}-A \,b^{3} d^{3} e -B \,a^{3} d \,e^{3}+3 B \,a^{2} b \,d^{2} e^{2}-3 B a \,b^{2} d^{3} e +b^{3} B \,d^{4}}{2 e^{5} \left (e x +d \right )^{2}}-\frac {3 A \,a^{2} b \,e^{3}-6 A a \,b^{2} d \,e^{2}+3 A \,b^{3} d^{2} e +B \,a^{3} e^{3}-6 B \,a^{2} b d \,e^{2}+9 B a \,b^{2} d^{2} e -4 b^{3} B \,d^{3}}{e^{5} \left (e x +d \right )}+\frac {3 b \left (A a b \,e^{2}-A \,b^{2} d e +B \,a^{2} e^{2}-3 B a b d e +2 b^{2} B \,d^{2}\right ) \ln \left (e x +d \right )}{e^{5}}\) | \(267\) |
norman | \(\frac {\frac {b^{2} \left (A b e +3 B a e -2 B b d \right ) x^{3}}{e^{2}}-\frac {a^{3} A \,e^{4}+3 A \,a^{2} b d \,e^{3}-9 A a \,b^{2} d^{2} e^{2}+9 A \,b^{3} d^{3} e +B \,a^{3} d \,e^{3}-9 B \,a^{2} b \,d^{2} e^{2}+27 B a \,b^{2} d^{3} e -18 b^{3} B \,d^{4}}{2 e^{5}}-\frac {\left (3 A \,a^{2} b \,e^{3}-6 A a \,b^{2} d \,e^{2}+6 A \,b^{3} d^{2} e +B \,a^{3} e^{3}-6 B \,a^{2} b d \,e^{2}+18 B a \,b^{2} d^{2} e -12 b^{3} B \,d^{3}\right ) x}{e^{4}}+\frac {b^{3} B \,x^{4}}{2 e}}{\left (e x +d \right )^{2}}+\frac {3 b \left (A a b \,e^{2}-A \,b^{2} d e +B \,a^{2} e^{2}-3 B a b d e +2 b^{2} B \,d^{2}\right ) \ln \left (e x +d \right )}{e^{5}}\) | \(267\) |
risch | \(\frac {b^{3} B \,x^{2}}{2 e^{3}}+\frac {b^{3} A x}{e^{3}}+\frac {3 b^{2} B a x}{e^{3}}-\frac {3 b^{3} B d x}{e^{4}}+\frac {\left (-3 A \,a^{2} b \,e^{3}+6 A a \,b^{2} d \,e^{2}-3 A \,b^{3} d^{2} e -B \,a^{3} e^{3}+6 B \,a^{2} b d \,e^{2}-9 B a \,b^{2} d^{2} e +4 b^{3} B \,d^{3}\right ) x -\frac {a^{3} A \,e^{4}+3 A \,a^{2} b d \,e^{3}-9 A a \,b^{2} d^{2} e^{2}+5 A \,b^{3} d^{3} e +B \,a^{3} d \,e^{3}-9 B \,a^{2} b \,d^{2} e^{2}+15 B a \,b^{2} d^{3} e -7 b^{3} B \,d^{4}}{2 e}}{e^{4} \left (e x +d \right )^{2}}+\frac {3 b^{2} \ln \left (e x +d \right ) A a}{e^{3}}-\frac {3 b^{3} \ln \left (e x +d \right ) A d}{e^{4}}+\frac {3 b \ln \left (e x +d \right ) B \,a^{2}}{e^{3}}-\frac {9 b^{2} \ln \left (e x +d \right ) B a d}{e^{4}}+\frac {6 b^{3} \ln \left (e x +d \right ) B \,d^{2}}{e^{5}}\) | \(304\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.32, size = 280, normalized size = 1.93 \begin {gather*} 3 \, {\left (2 \, B b^{3} d^{2} + B a^{2} b e^{2} + A a b^{2} e^{2} - {\left (3 \, B a b^{2} e + A b^{3} e\right )} d\right )} e^{\left (-5\right )} \log \left (x e + d\right ) + \frac {1}{2} \, {\left (B b^{3} x^{2} e - 2 \, {\left (3 \, B b^{3} d - 3 \, B a b^{2} e - A b^{3} e\right )} x\right )} e^{\left (-4\right )} + \frac {7 \, B b^{3} d^{4} - A a^{3} e^{4} - 5 \, {\left (3 \, B a b^{2} e + A b^{3} e\right )} d^{3} + 9 \, {\left (B a^{2} b e^{2} + A a b^{2} e^{2}\right )} d^{2} - {\left (B a^{3} e^{3} + 3 \, A a^{2} b e^{3}\right )} d + 2 \, {\left (4 \, B b^{3} d^{3} e - B a^{3} e^{4} - 3 \, A a^{2} b e^{4} - 3 \, {\left (3 \, B a b^{2} e^{2} + A b^{3} e^{2}\right )} d^{2} + 6 \, {\left (B a^{2} b e^{3} + A a b^{2} e^{3}\right )} d\right )} x}{2 \, {\left (x^{2} e^{7} + 2 \, d x e^{6} + d^{2} e^{5}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 399 vs.
\(2 (149) = 298\).
time = 0.45, size = 399, normalized size = 2.75 \begin {gather*} \frac {7 \, B b^{3} d^{4} + {\left (B b^{3} x^{4} - A a^{3} + 2 \, {\left (3 \, B a b^{2} + A b^{3}\right )} x^{3} - 2 \, {\left (B a^{3} + 3 \, A a^{2} b\right )} x\right )} e^{4} - {\left (4 \, B b^{3} d x^{3} - 4 \, {\left (3 \, B a b^{2} + A b^{3}\right )} d x^{2} - 12 \, {\left (B a^{2} b + A a b^{2}\right )} d x + {\left (B a^{3} + 3 \, A a^{2} b\right )} d\right )} e^{3} - {\left (11 \, B b^{3} d^{2} x^{2} + 4 \, {\left (3 \, B a b^{2} + A b^{3}\right )} d^{2} x - 9 \, {\left (B a^{2} b + A a b^{2}\right )} d^{2}\right )} e^{2} + {\left (2 \, B b^{3} d^{3} x - 5 \, {\left (3 \, B a b^{2} + A b^{3}\right )} d^{3}\right )} e + 6 \, {\left (2 \, B b^{3} d^{4} + {\left (B a^{2} b + A a b^{2}\right )} x^{2} e^{4} - {\left ({\left (3 \, B a b^{2} + A b^{3}\right )} d x^{2} - 2 \, {\left (B a^{2} b + A a b^{2}\right )} d x\right )} e^{3} + {\left (2 \, B b^{3} d^{2} x^{2} - 2 \, {\left (3 \, B a b^{2} + A b^{3}\right )} d^{2} x + {\left (B a^{2} b + A a b^{2}\right )} d^{2}\right )} e^{2} + {\left (4 \, B b^{3} d^{3} x - {\left (3 \, B a b^{2} + A b^{3}\right )} d^{3}\right )} e\right )} \log \left (x e + d\right )}{2 \, {\left (x^{2} e^{7} + 2 \, d x e^{6} + d^{2} e^{5}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 299 vs.
\(2 (139) = 278\).
time = 2.57, size = 299, normalized size = 2.06 \begin {gather*} \frac {B b^{3} x^{2}}{2 e^{3}} + \frac {3 b \left (a e - b d\right ) \left (A b e + B a e - 2 B b d\right ) \log {\left (d + e x \right )}}{e^{5}} + x \left (\frac {A b^{3}}{e^{3}} + \frac {3 B a b^{2}}{e^{3}} - \frac {3 B b^{3} d}{e^{4}}\right ) + \frac {- A a^{3} e^{4} - 3 A a^{2} b d e^{3} + 9 A a b^{2} d^{2} e^{2} - 5 A b^{3} d^{3} e - B a^{3} d e^{3} + 9 B a^{2} b d^{2} e^{2} - 15 B a b^{2} d^{3} e + 7 B b^{3} d^{4} + x \left (- 6 A a^{2} b e^{4} + 12 A a b^{2} d e^{3} - 6 A b^{3} d^{2} e^{2} - 2 B a^{3} e^{4} + 12 B a^{2} b d e^{3} - 18 B a b^{2} d^{2} e^{2} + 8 B b^{3} d^{3} e\right )}{2 d^{2} e^{5} + 4 d e^{6} x + 2 e^{7} x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.24, size = 273, normalized size = 1.88 \begin {gather*} 3 \, {\left (2 \, B b^{3} d^{2} - 3 \, B a b^{2} d e - A b^{3} d e + B a^{2} b e^{2} + A a b^{2} e^{2}\right )} e^{\left (-5\right )} \log \left ({\left | x e + d \right |}\right ) + \frac {1}{2} \, {\left (B b^{3} x^{2} e^{3} - 6 \, B b^{3} d x e^{2} + 6 \, B a b^{2} x e^{3} + 2 \, A b^{3} x e^{3}\right )} e^{\left (-6\right )} + \frac {{\left (7 \, B b^{3} d^{4} - 15 \, B a b^{2} d^{3} e - 5 \, A b^{3} d^{3} e + 9 \, B a^{2} b d^{2} e^{2} + 9 \, A a b^{2} d^{2} e^{2} - B a^{3} d e^{3} - 3 \, A a^{2} b d e^{3} - A a^{3} e^{4} + 2 \, {\left (4 \, B b^{3} d^{3} e - 9 \, B a b^{2} d^{2} e^{2} - 3 \, A b^{3} d^{2} e^{2} + 6 \, B a^{2} b d e^{3} + 6 \, A a b^{2} d e^{3} - B a^{3} e^{4} - 3 \, A a^{2} b e^{4}\right )} x\right )} e^{\left (-5\right )}}{2 \, {\left (x e + d\right )}^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.14, size = 290, normalized size = 2.00 \begin {gather*} x\,\left (\frac {A\,b^3+3\,B\,a\,b^2}{e^3}-\frac {3\,B\,b^3\,d}{e^4}\right )-\frac {\frac {B\,a^3\,d\,e^3+A\,a^3\,e^4-9\,B\,a^2\,b\,d^2\,e^2+3\,A\,a^2\,b\,d\,e^3+15\,B\,a\,b^2\,d^3\,e-9\,A\,a\,b^2\,d^2\,e^2-7\,B\,b^3\,d^4+5\,A\,b^3\,d^3\,e}{2\,e}+x\,\left (B\,a^3\,e^3-6\,B\,a^2\,b\,d\,e^2+3\,A\,a^2\,b\,e^3+9\,B\,a\,b^2\,d^2\,e-6\,A\,a\,b^2\,d\,e^2-4\,B\,b^3\,d^3+3\,A\,b^3\,d^2\,e\right )}{d^2\,e^4+2\,d\,e^5\,x+e^6\,x^2}+\frac {\ln \left (d+e\,x\right )\,\left (3\,B\,a^2\,b\,e^2-9\,B\,a\,b^2\,d\,e+3\,A\,a\,b^2\,e^2+6\,B\,b^3\,d^2-3\,A\,b^3\,d\,e\right )}{e^5}+\frac {B\,b^3\,x^2}{2\,e^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________